TOPE = 1000

if __name__ == "__main__":
	suma = 0
	for x in range(1, TOPE):
		if (x % 3 == 0) or (x % 5 == 0):
			suma = suma + x
	print "\n", suma, "\n"
